<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			.black{
				color: #FFFFFF;
				background-color: #000000;
			}
		</style>
		<script src="../js/jquery-3.7.1.js"></script>
		<script type="text/javascript">
			$(function() {
				var isBalck=false;
				$("button").bind("click",function(){
					if(isBalck){
						$(document.body).removeClass("black")
						$("button").removeClass("black")
						$("button").text("黑暗模式");
						isBalck=false;
					}else{
						$(document.body).addClass("black")
						$("button").addClass("black")
						$("button").text("明亮模式");
						isBalck=true;
					}
				})
			})
		</script>
		
	</head>
	<body>
		<span>这是网页内容</span>
		<button type="button" style="position: fix;right: 20px;">黑暗模式</button>
	</body>
</html>
